package com.bitdf.txing.group.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.bitdf.txing.common.entity.BaseEntity;
import com.bitdf.txing.common.valid.SaveGroup;
import com.bitdf.txing.common.valid.UpdateGroup;
import com.bitdf.txing.common.valid.anno.ListValue;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 
 * 
 * @author Lizhiwei
 * @email 123@qq.com
 * @date 2022-09-05 16:02:12
 */
@Data
@TableName("tx_gms_group_category")
public class GroupCategoryEntity extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 分类名称
	 */
	@NotBlank(groups = {SaveGroup.class})
	private String name;
	/**
	 * 父分类id
	 */
	@NotNull(groups = {SaveGroup.class})
	private Long parentId;
	/**
	 * 层级
	 */
	@NotNull(groups = {SaveGroup.class})
	@ListValue(vals = {0, 1, 2, 3}, groups = {SaveGroup.class, UpdateGroup.class})
	private Integer level;
	/**
	 * 是否显示（0：不显示 1：显示）
	 */
	@NotNull(groups = {SaveGroup.class})
	@ListValue(vals = {0, 1}, groups = {SaveGroup.class, UpdateGroup.class})
	private Byte showStatus;
	/**
	 * 排序
	 */
	@NotNull(groups = {SaveGroup.class})
	@Range(min = 0, groups = {SaveGroup.class, UpdateGroup.class})
	private Integer sort;
	/**
	 * 图标地址
	 */
	@NotBlank(groups = {SaveGroup.class})
	private String icon;

}
